export default {
    namespaced: true,
    state: {
        userInfo: {
            username: "",
            token: ""
        }
    },
    mutations: {
        getUser(state, user) {
            state.userInfo = {
                username: user.username,
                token: user.token
            }
        },
        clearUser(state) {
            state.userInfo = {
                username: "",
                token: ""
            }
        }
    },
}
